//
//  LMLabelSelectCollectionViewCell.m
//  TRGFShop
//
//  Created by LM on 2022/1/25.
//  Copyright © 2022 trgf. All rights reserved.
//

#import "LMLabelSelectCollectionViewCell.h"

@implementation LMLabelSelectCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
}

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self){
        [self setUI];
    }
    return self;
}


- (void)setUI{
    [self.contentView addSubview:self.titleLab];
    [self.contentView addSubview:self.iconBgImageView];
    [self.contentView addSubview:self.lineView];
}


- (UILabel*)titleLab{
    if (!_titleLab){
        _titleLab = [[UILabel alloc]initWithFrame:self.bounds];
        _titleLab.textAlignment = NSTextAlignmentCenter;
    }
    return _titleLab;
}


- (UIImageView*)iconBgImageView{
    if (!_iconBgImageView){
        _iconBgImageView = [[UIImageView alloc]initWithFrame:self.bounds];
    }
    return _iconBgImageView;
}

- (UIView*)lineView{
    if (!_lineView){
        _lineView = [[UIView alloc]initWithFrame:CGRectMake(3, CGRectGetHeight(self.frame)-3, CGRectGetWidth(self.frame)-6, 3)];
        _lineView.backgroundColor = [UIColor redColor];
    }
    return _lineView;
}

@end
